<?php
/*
 * Hooligan - A sports facilities management software
 * Copyright (C) 2009/2010 Gianluca Bargelli <g.bargelli@gmail.com>,
 * Andrea Biocco <abiocco@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Project home: <http://code.google.com/hooligan>
 *
 */
/**
 * @brief Base for simple templating system (CSS and HTML)
 *
 * <b>English</b>
 *
 * As many page shares many common components such as CSS and
 * some HTML it was necessary to introduce a simple templating system;
 * It supplies displayHeader($title) and displayFooter() as two static methods while
 * displayPanel() leaves it's implementation to real non-abstract classes.
 *
 * @see Template_Admin
 *
 * <b>Italiano</b>
 *
 *
 *
 * @author Gianluca Bargelli
 */
abstract class Template_Base {
    
    public static function displayHeader($title)
    {
        ?>
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
        <html>
            <head>
                <link type="text/css" href="css/style.css" rel="stylesheet">
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                <title>Hooligan - <?php echo $title ?></title>
            </head>
            <body>
                <div id="content">
        <?php
    }

    public static function displayFooter()
    {
        ?>
                </div>
            </body>
        </html>
        <?php
    }

    abstract public static function displayPanel();
}
?>
